<include file="Public:header"/>
<div class="wrapper">
  <div class="sitepath">当前位置：<a href="{$webConfig['host_url']}">首页</a> &nbsp;&rsaquo;&nbsp; <a href="{:U('/websites/')}">网站目录</a> &nbsp;&rsaquo;&nbsp; 站点详情</div>
  <div class="clear"></div>
</div>

<php>


</php>
<div class="wrapper">
  <div class="mainbox">
    <div class="mainbox-left">
      <div class="sitebox">
        <h1 class="wtitle"><a href="http://{$info['domain']}/" rel="nofollow" target="_blank" onclick="clickout({$info['id']})">{$info['name']}</a></h1>
        <ul class="siteinfo">
          <li><strong>网站标题：</strong>{$info['name']}</li>
          <li><strong>网站地址：</strong><a href="http://{$info['domain']}/" target="_blank" class="visit" onclick="clickout({$info['id']})">{$info['domain']}</a></li>
          <li><strong>网站评分：</strong><span id="star" class="star{$info['score_avg']}"><em onmousemove="changeGstar(1)"></em><em onmousemove="changeGstar(2)"></em><em onmousemove="changeGstar(3)"></em><em onmousemove="changeGstar(4)"></em><em onmousemove="changeGstar(5)"></em></span>
          <input type="hidden" value="5" id="star-count">({$info['score']})</li>
          <notempty name="info['ip']">
          <li><strong>服务器IP：</strong>{:long2ip($info['ip'])}</li>
          </notempty>
           <notempty name="info['keywords']">
          <li><strong>TAG标签：</strong>{$info['keywords']}　</li>
          </notempty>
          <notempty name="info['description']">
          <li><strong>网站描述：</strong><span style="line-height: 23px;">{$info['description']}</span></li>
          </notempty>
          <li></li>
        </ul>
        <ul class="wdata">
          <li class="line"><em style="color: #f00;">{$info['views']}℃</em>关注热度</li>
          <li class="line"><em>{$info['brank']}</em>百度权重</li>
          <li class="line"><em>{$info['grank']}</em>PageRank</li>
          <li class="line"><em>{$info['srank']}</em>搜狗评级</li>
          <li class="line"><em>{$info['arank']}</em>AlexaRank</li>
          <li class="line"><em>{$info['instat']}</em>入站次数</li>
          <li class="line"><em>{$info['outstat']}</em>出站次数</li>
          <li class="line"><em>{:date('Y-m-d', $info['add_time'])}</em>收录日期</li>
          <li><em style="color: #f00;">{:date('Y-m-d', $info['update_time'])}</em>更新日期</li>
        </ul>
        <div class="relsite">
          <h2>相关站点</h2>
          <ul class="rellist">
          	<websites cateid="info['cate_id']" limit="5">
            <li><a href="{$vo['url']}"><img src="http://api.webthumbnail.org?width=320&height=200&screen=1024&url=http://{$vo['domain']}" width="120" height="80" alt="{$vo['name']}" /><strong>{$vo['name']}</strong></a></li>
           </websites>
          </ul>
        </div>
        <div class="clear"></div>
        <dl class="comment-box">
        	<dt>精彩点评(<span id="date-comment-count-show">0</span>)</dt>
            <dd class="comment-form">
            <form method="post" action="{:U('/comment/post/')}" onsubmit="return postComment('websites');">
                <label>昵称：</label>
                <p>
                	<input type="text" placeholder="请输入您的姓名或昵称" id="comment-name" name="name" />
                </p>
                <label>点评：</label>
                <textarea name="content" id="comment-content" placeholder="请输入的看法"></textarea>
                <div>
                  <input type="hidden" name="id" id="comment-info-id" value="{$info['id']}" />
                  <button type="submit" id="btn-submit">评论</button>
                  <p>你还可以输入<span id="content-count">145</span>个字</p>
                </div>
            </form>
            <div class="clear"></div>
            <div class="comment-list" id="comment-list">
              <comment id="com" page="info['nowPage']" target_id="info['id']" types="websites">
              <div>
                  <span>{:dateLocalFormat($com['add_time'])}</span><strong>{$com['name']}说：</strong>{$com['content']}
              </div>
              </comment>
              <div class="clear"></div>
              <comment id="compage" page="info['nowPage']" target_id="info['id']" types="websites" showpage="1">
              <div class="page" id="date-comment-count" data-value="{$compage['count']}"> <foreach name="compage['forPage']" item="vo">
                <if condition="($compage['nowPage'] == $vo)"> <span>{$vo}</span>
                  <else/>
                  <a href="javascript:getCommentList('{$info[id]}', 'websites', {$vo});">{$vo}</a> </if>
              </foreach></div>
              
              <else/>
               <p style="padding:20px; text-align:center">还没有评论，赶快来抢沙发吧!</p>
              </comment>
            </div>
          </dd>
        </dl>
      </div>
    </div>
    <div class="mainbox-right">
      <div class="wthumb"><img src="http://api.webthumbnail.org?width=320&height=200&screen=1024&url=http://{$info['domain']}" width="230" alt="“{$info['name']}”网站截图" /></div>
      <div class="clear"></div>
      <div class="hotbox">
        <h2>最新目录资讯</h2>
        <ul class="hotlist">
        <article limit="9">
        <li><a href="{$vo['url']}"><span>{$key+1}.</span>{$vo['name']}</a><em>{$vo['views']}℃</em></li>
        </article>
        </ul>
      </div>
      <div class="clear"></div>
      <div class="bestbox">
        <h2>最新加入站点</h2>
        <ul class="bestlist">
        	<websites limit="5">
            	 <li <if condition="($key+1) == 5"> class="last"</if>>
              <div><a href="{$vo['url']}" rel="nofollow"><img src="http://api.webthumbnail.org?width=320&height=200&screen=1024&url=http://{$vo['domain']}" alt="{$vo['name']}"></a></div>
              <p><a href="{$vo['url']}">{$vo['name']}</a><br>
                <span>{$vo['domain']}</span></p>
            </li>
           </websites>
        </ul>
      </div>
      <div class="clear"></div>
      <div>{:W('Ad', 11)}</div>
    </div>
  </div>
</div>
<script type="text/javascript">
</script>
<script type="text/javascript">
function changeGstar(num){
	document.getElementById('star-count').value = num;
	document.getElementById('star').className = "star"+num;
}
$(function(){
	$("#star em").click(function(){
		if($.cookie('score_{$info["id"]}') == 1){
			alert('你已经评分过了!');
		}else{
			var num = $("#star-count").val();
			$.ajax({
			   type: "POST",
			   url: "{:U('score')}",
			   data: "id={$info['id']}&s="+num,
			   success: function(data){
				  
					if(data['status'] == 1){
						$.cookie('score_{$info["id"]}', 1);
						window.location.href = "{:setViewUrl('site', $info)}";
						return false;
					}else{
						alert(data['info']);
						return false;
					}
			   }
			});	
		}
	});	
});
</script>
<if condition="(NOW_TIME - (3600 * 24 * 30)) gt $info['update_time']">
<script type="text/javascript" src="{:U('getData', array('type'=>'ip','id'=>$info['id']))}"></script>
<script type="text/javascript" src="{:U('getData', array('type'=>'brank','id'=>$info['id']))}"></script>
<script type="text/javascript" src="{:U('getData', array('type'=>'grank','id'=>$info['id']))}"></script>
<script type="text/javascript" src="{:U('getData', array('type'=>'srank','id'=>$info['id']))}"></script>
<script type="text/javascript" src="{:U('getData', array('type'=>'arank','id'=>$info['id']))}"></script> 
</if>
<include file="Public:footer"/> 